package main;

import debug.DebugEventListener;
import java.awt.AWTEvent;
import java.awt.Toolkit;
import javax.swing.JFrame;

import controller.ContactManager;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import persistence.PersistenceUtil;



/**
 * 
 * @author hbriand
 *
 * @class ContactListManager
 * @desc The main of the desktop application : launches the controller
 */
public class ContactListManager {
    private static Log log = LogFactory.getLog(ContactListManager.class);

    /**
     * @param args
     */
    public static void main(String[] args) {
        log.info("Starting ContactListManager");
        // Start JPA/Hibernate and load persistence.xml config
        PersistenceUtil.init();

        JFrame.setDefaultLookAndFeelDecorated(false);
        // This was used to debug the interface (kinda hard without using an interface designer)
        //Toolkit.getDefaultToolkit().addAWTEventListener(new DebugEventListener(), AWTEvent.MOUSE_EVENT_MASK);
        ContactManager mainWindow = new ContactManager();
        mainWindow.show();
    }
}
